package cn.elves.model.provider;

import cn.elves.model.entity.dto.UserDTO;
import cn.elves.model.entity.dto.response.ResponseDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "user-service",contextId = "user")
public interface UserProvider {

    @GetMapping("getUserByPhone")
    public ResponseDTO<UserDTO> getUserByPhone(@RequestParam(name = "phone")String phone);

    @GetMapping("getUserByUsername")
    public ResponseDTO<UserDTO> getUserByUsername(@RequestParam(name = "username")String username);
}
